<script setup lang="ts">
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { useJackpotStore } from './store';
import { storeToRefs } from 'pinia';
import { UserApi } from './api/user';
const store = useJackpotStore()

const { token } = storeToRefs(store);

if (token.value) {
    UserApi.getJackpotUserInfo()
        .then(res => {
            if (res.code === 200) {
                console.log(res.data)
                store.setUserInfo(res.data)
            }
        })
}
</script>

<template>
    <el-config-provider :locale="zhCn">
        <router-view></router-view>
    </el-config-provider>
</template>

<style scoped lang="scss"></style>
